package com.github.spy.apollo.squirrel.common;

/**
 * module name
 *
 * @author spy
 * @version 1.0 2020/8/20
 * @since 1.0
 */
public enum OrderState {
    INIT,
    WAIT_PAY,
    WAIT_SEND,
    PART_SEND,
    WAIT_RECEIVE,
    COMPLETE,
    CANCELED;

    public static OrderState getState(String state) {
        for (OrderState orderState : OrderState.values()) {
            if (orderState.name().equalsIgnoreCase(state)) {
                return orderState;
            }
        }
        return null;
    }
}